package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.HmsOrderMapper;
import com.ruoyi.system.domain.HmsOrder;
import com.ruoyi.system.service.IHmsOrderService;
import com.ruoyi.common.core.text.Convert;

/**
 * 订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-16
 */
@Service
public class HmsOrderServiceImpl implements IHmsOrderService 
{
    @Autowired
    private HmsOrderMapper hmsOrderMapper;

    /**
     * 查询订单
     * 
     * @param orderId 订单主键
     * @return 订单
     */
    @Override
    public HmsOrder selectHmsOrderByOrderId(Long orderId)
    {
        return hmsOrderMapper.selectHmsOrderByOrderId(orderId);
    }

    /**
     * 查询订单列表
     * 
     * @param hmsOrder 订单
     * @return 订单
     */
    @Override
    public List<HmsOrder> selectHmsOrderList(HmsOrder hmsOrder)
    {
        return hmsOrderMapper.selectHmsOrderList(hmsOrder);
    }

    /**
     * 新增订单
     * 
     * @param hmsOrder 订单
     * @return 结果
     */
    @Override
    public int insertHmsOrder(HmsOrder hmsOrder)
    {
        return hmsOrderMapper.insertHmsOrder(hmsOrder);
    }

    /**
     * 修改订单
     * 
     * @param hmsOrder 订单
     * @return 结果
     */
    @Override
    public int updateHmsOrder(HmsOrder hmsOrder)
    {
        return hmsOrderMapper.updateHmsOrder(hmsOrder);
    }

    /**
     * 批量删除订单
     * 
     * @param orderIds 需要删除的订单主键
     * @return 结果
     */
    @Override
    public int deleteHmsOrderByOrderIds(String orderIds)
    {
        return hmsOrderMapper.deleteHmsOrderByOrderIds(Convert.toStrArray(orderIds));
    }

    /**
     * 删除订单信息
     * 
     * @param orderId 订单主键
     * @return 结果
     */
    @Override
    public int deleteHmsOrderByOrderId(Long orderId)
    {
        return hmsOrderMapper.deleteHmsOrderByOrderId(orderId);
    }
}
